x86/mem-sharing: mem-sharing a range of memory
authorTamas K Lengyel <tamas.lengyel@zentific.com>
Mon, 1 Aug 2016 17:14:27 +0000 (11:14 -0600)
committerWei Liu <wei.liu2@citrix.com>
Tue, 2 Aug 2016 16:03:10 +0000 (17:03 +0100)
commitf3356e1d4db14439fcca47c493d902bbbb5ec17e
tree0450a4956d32757450c046461e67c9031dfb2009
parent09a4ef83511ba33e08b3c712497ec0d67a5ec6d7
x86/mem-sharing: mem-sharing a range of memory

Currently mem-sharing can be performed on a page-by-page basis from the control
domain. However, this process is quite wasteful when a range of pages have to
be deduplicated.

This patch introduces a new mem_sharing memop for range sharing where
the user doesn't have to separately nominate each page in both the source and
destination domain, and the looping over all pages happen in the hypervisor.
This significantly reduces the overhead of sharing a range of memory.

Signed-off-by: Tamas K Lengyel <tamas.lengyel@zentific.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/libxc/include/xenctrl.h
tools/libxc/xc_memshr.c
tools/tests/mem-sharing/memshrtool.c
xen/arch/x86/mm/mem_sharing.c
xen/include/public/memory.h